import java.util.LinkedList;
import java.util.List;

public class LinkedListTest {
    public static void main(String[] args) {
        List<String> list=new LinkedList<>();
        list.add("a");
        list.add("b");
        list.add("c");
        list.add("a");
        for(String str:list){
            System.out.println(str);
        }

        System.out.println("-------------");
        LinkedList<String> linkedList=new LinkedList<>();
        linkedList.addFirst("a");
        linkedList.addFirst("b");
        linkedList.addFirst("c");
        for(String str:linkedList){
            System.out.println(str);
        }
        System.out.println("-------------");
        LinkedList<String> linkedList01=new LinkedList<>();
        linkedList01.addLast("a");
        linkedList01.addLast("b");
        linkedList01.addLast("c");
        //linkedList01.remove();
        //linkedList01.remove(2);
        //String s = linkedList01.removeFirst();

        for(String str:linkedList01){
            System.out.println(str);
        }
        System.out.println(linkedList01.isEmpty());
    }


}
